@(pageName: Option[String],
  from: String,
  to: String,
  diffs: Seq[gitbucket.core.util.JGitUtil.DiffInfo],
  repository: gitbucket.core.service.RepositoryService.RepositoryInfo,
  hasWritePermission: Boolean,
  info: Option[Any])(implicit context: gitbucket.core.controller.Context)
@import context._
@import gitbucket.core.view.helpers._
@html.main(s"Compare Revisions - ${repository.owner}/${repository.name}", Some(repository)){
  @helper.html.information(info)
  @html.menu("wiki", repository){
    <ul class="nav nav-tabs fill-width pull-left">
      <li>
        <h1 class="wiki-title"><span class="muted">Compare Revisions</span></h1>
      </li>
      <li class="pull-right">
        <div class="btn-group">
        @if(pageName.isDefined){
          <a class="btn btn-small" href="@url(repository)/wiki/@urlEncode(pageName)">View Page</a>
          <a class="btn btn-small" href="@url(repository)/wiki/@urlEncode(pageName)/_history">Back to Page History</a>
        } else {
          <a class="btn btn-small" href="@url(repository)/wiki/_history">Back to Wiki History</a>
        }
        </div>
      </li>
    </ul>
    <div class="pull-left">
      @helper.html.diff(diffs, repository, None, None, false, None, false, false)
    </div>
    @if(hasWritePermission){
      <div>
        @if(pageName.isDefined){
          <a href="@url(repository)/wiki/@urlEncode(pageName)/_revert/@from...@to" class="btn">Revert Changes</a>
        } else {
          <a href="@url(repository)/wiki/_revert/@from...@to" class="btn">Revert Changes</a>
        }
      </div>
    }
  }
}
